package com.yang.abstract_factory;

import com.yang.abstract_factory.impl.CarFactory;
import com.yang.abstract_factory.impl.PaintFactory;

public class FactoryProducer {
    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("CAR")){
            return new CarFactory();
        } else if(choice.equalsIgnoreCase("PAINT")){
            return new PaintFactory();
        }
        return null;
    }
}
